home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
rascal.arc
/
CHARS.RAS
< prev
next >
Wrap
Text File
|
1980-01-01
|
1KB
|
63 lines
'CHARS.RAS: Display all the PC's screen characters, modified from
' Peter Norton's book.
INCLUDE DEBUG.INC
DEBUG
INCLUDE INPUT.INC
INCLUDE SCREEN.INC
PROCEDURE MAIN
DO INITIALIZE.SCREEN
DO INITIALIZE.INPUT
L.TITLE$ = "CHARS - Display the IBM PC Character Set"
R.TITLE$ = "Rascal version 1.05"
DO SET.TITLES
FUNC.MSG$ = "Rascal Example #1"
DO SET.FUNCTION.MSG
DO GET.DISPLAY.TYPE
DO SET.TITLES
DO SET.FUNCTION.MSG
DO BORDERS
DO BUILD.DISPLAY.ARRAY
DO FINISH
ENDPROC
PROCEDURE GET.DISPLAY.TYPE
LOCATE 5,1 : PRINT "Is this a color-graphics display? ";
DO GET.YES.OR.NO
IF ANSWER = YES
SEGVAL! = &HB800 'Color segment
ELSE
SEGVAL! = &HB000 'Monochrome segment
ENDIF
DEF SEG = SEGVAL!
PRINT
ENDPROC
PROCEDURE BORDERS
FOR HEX.DIGIT% = 0 TO 15
LOCATE 6,HEX.DIGIT% * 3 + 14
PRINT HEX$(HEX.DIGIT%)
LOCATE HEX.DIGIT%+8,8
PRINT HEX$(HEX.DIGIT%)
NEXT HEX.DIGIT%
LOCATE ,,0
ENDPROC
PROCEDURE BUILD.DISPLAY.ARRAY
FOR ROW% = 0 TO 15
FOR COL% = 0 TO 15
POKE (ROW%+7)*160+COL%*6+26, COL%+ROW%*16
NEXT COL%
NEXT ROW%
ENDPROC
PROCEDURE FINISH
LINE.24.MSG$ = "Press any key to return to DOS..."
DO SET.LINE.24
DO IN.GET.KEY
DO CLEAR.SCREEN
SYSTEM
ENDPROC